import { Schema } from 'mongoose';
import { dbConfig } from '../../config/db';

const { tables } = dbConfig;
const { video } = tables;

export const videoSchema = new Schema({
  // 关键词
  key: {
    type: String,
    default: '',
  },
  // 视频链接
  videoSrc: {
    type: String,
    default: '',
  },
  // 封面图片
  coverImg: {
    type: String,
    default: '',
  },
  // 弹幕
  barrage: {
    type: Object,
    default: '',
  },
  // 描述
  desc: {
    type: String,
    default: '',
  },
  // 观看量
  viewCount: {
    type: Number,
    default: '',
  },
  // 时长
  timeLen: {
    type: String,
    default: '',
  }
}, {
  collection: video
})